const bluebird = require('bluebird')
const fs = require('fs')

const readFileAsync = bluebird.promisify(fs.readFile)

fs.readFile('./data.log', {encoding:'utf-8'}, (err, data) => {
    if(err) {
        console.log(err);
        return
    }
    console.log(data);
})

readFileAsync('./data.log',  {encoding:'utf-8'}).then((result) => {
    console.log(result);
}).catch((err) => {
    console.log(err);
});